<template>
  <div class="chongzhi">
    <div class="rechange-div">
      <div class="detail-page" v-if="module.modules && module.modules[0] && module.modules[0].pic">
        <img
          class="detail-page-img"
          style="height:120px"
          :src="fileBaseUrl + module.modules[0].pic"
        >
      </div>
      <div class="flex-x rechange">
        <div
          class="rechange-item flex-x-center-center"
          v-for="item in 9"
          :key="item"
        >
          {{ item / 100 }}
        </div>
      </div>
      <div
        class="flex-x-center-center moreRechange"
        style="color:#fff;background:#ffb72f;"
      >
        更多充值金额
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    module: {
      type: Object,
    },
    fileBaseUrl: {
      type: String,
    },
  },
  watch: {
    'module.modules': {
      handler() {
        this.$forceUpdate()
      },
      deep: true,
      immediate: true
    }
  },
};
</script>

<style lang="scss" scoped>
.rechange-div {
  padding: 0px 10px 15px 10px;
}
.detail-page {
  overflow: hidden;
  .detail-page-img {
    border-radius: 10px;
  }
  margin-bottom: 16px;
}
.rechange {
  flex-wrap: wrap;
  margin-bottom: 13px;
  .rechange-item {
    width: calc((100% - 5px * 4) / 3);
    height: 53px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 18px;
    font-family: Source Han Sans SC;
    font-weight: 400;
    color: #000000;
    margin-right: 10px;
    margin-bottom: 13px;
  }
  .rechange-item:nth-child(3n) {
    margin-right: 0;
  }
}
.moreRechange {
  width: 300px;
  height: 44px;
  border-radius: 22px;
  font-size: 16px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #ffffff;
  margin: 0 auto;
}

</style>
